package org.zxp.javacheck.parampassing;

import java.util.HashMap;

/**
 * @program: effectiveJava
 * @description: ${description}
 * @author: X-Pacific zhang
 * @create: 2019-05-21 11:50
 **/
public class MyThread implements Runnable {
    ParameterPassing.ObjectPassing objectPassing = null;
    public MyThread(ParameterPassing.ObjectPassing objectPassing){
        this.objectPassing = objectPassing;
    }
    @Override
    public void run() {
        while (true){
            System.out.println("1:"+objectPassing.getName());
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
